﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

using Gnosis.Alexandria.Controllers;
using Gnosis.Alexandria.Views;

namespace Gnosis.Alexandria
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                MainView view = new MainView();
                var controller = new MainController(view);
                controller.Send(null, MessageTypes.RequestControllerInitialize);
                
                Application.Run(view);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace, "An Error Occurred");
            }
        }
    }
}
